Skip to content

listing: open private projects from Pascal with no secret in the viewer - #2

Merged
wass08 merged 1 commit into
mainfrom
listing/pascal-handoff
Nov 10, 2026
Merged

wass08 merged 1 commit into
mainfrom
listing/pascal-handoff

Conversation

@wass08

@wass08 wass08 commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

The listing template can now open private Pascal projects with no secret in the viewer. It is the client side of pascalorg/private-editor#1556.

  • src/pascal/handoff.ts: authorization code plus S256 PKCE. The verifier lives in sessionStorage, the callback parameters are scrubbed from the URL, and the code is exchanged for a short-lived origin-bound credential.
  • src/pascal/access.ts: decides whether a visit involves the handoff, and runs the reopen flows ("Reopen your share link", "Open again from Pascal") when the credential expires or is revoked. Plain public visits skip the descriptor lookup entirely.
  • The client passes the credential as a Bearer token, including when renewing GLB URLs.
  • Smoke specs cover the handoff and its failure states against a mocked Pascal. Verified end to end against a local Pascal with #1556: the private project renders, and revocation shows the reopen state.

Depends on #1556 being deployed before it works against editor.pascal.app. Public projects behave as before.

🤖 Generated with Claude Code

The listing viewer now takes access from Pascal's handoff. When Pascal
sends a visitor (Open in <viewer>, or a private link bound to this
viewer), the viewer starts an authorization-code + PKCE round trip,
exchanges the code for a short-lived credential for that one project,
keeps it in this tab's sessionStorage and renews it near expiry. Public
visits stay anonymous and skip the registry lookup. The same deployed
bundle works for every project its owner binds.

- src/pascal/handoff.ts + access.ts: entry detection, descriptor lookup,
  S256 PKCE, immediate callback scrubbing, state and issuer checks,
  cookie-free exchange, renewal with a loop guard, and a reopen state
  instead of any silent fallback after a credential failure
- the company token endpoint (VITE_PASCAL_TOKEN_URL) still wins when set
- AGENTS.md "Open from Pascal"; 16 new smoke scenarios

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wass08
wass08 merged commit a399b75 into main Nov 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant